package com.lagou.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class AsyncTest {

    @Autowired
    private CounsumerComponet counsumerComponet;

    @Async
    public void test(){
        //System.out.println(Thread.currentThread().getName());
        counsumerComponet.methodA();
        counsumerComponet.methodB();
        counsumerComponet.methodC();
    }

}
